package com.ruoyi.procurementmanagement.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购合同产品(es_procurement_contract_product)对象 es_procurement_contract_product
 *
 * @author ruoyi
 * @date 2025-03-05
 */
public class EsProcurementContractProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 采购合同ID */
    @Excel(name = "采购合同ID")
    private Integer contractId;

    @Excel(name = "商品ID")
    private Long goodsId;

    /** 产品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 产品编号 */
    @Excel(name = "商品编号")
    private String goodsSn;

    /** 产品规格 */
    @Excel(name = "商品规格")
    private String specification;

    /** 分类ID */
    @Excel(name = "分类ID")
    private Integer categoryId;

    /** 分类名称 */
    @Excel(name = "分类名称")
    private String categoryName;

    /** 条形码 */
    @Excel(name = "条形码")
    private String barcode;

    /** 计划采购数量 */
    @Excel(name = "计划采购数量")
    private Integer num;

    /** 计划供应时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划供应时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date supplyTime;

    /** 产品成本价 */
    @Excel(name = "单价")
    private BigDecimal price;

    /** 税率 */
    @Excel(name = "税率")
    private BigDecimal taxRate;

    /** 合价 */
    @Excel(name = "合价")
    private BigDecimal totalPrice;

    /** 入库数量 */
    @Excel(name = "入库数量")
    private Long stockNum;

    @Excel(name = "备注")
    private String remark;

    // 在EsProcurementContractProduct类中添加
    @Excel(name = "单位")
    private String unit;

    private String supplierName; // 供应商名称
    private Long supplierId; // 供应商ID

    private String procurementPlanSn; // 采购计划编号

    public String getProcurementPlanSn() {
        return procurementPlanSn;
    }

    public void setProcurementPlanSn(String procurementPlanSn) {
        this.procurementPlanSn = procurementPlanSn;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getContractId() {
        return contractId;
    }

    public void setContractId(Integer contractId) {
        this.contractId = contractId;
    }

    public Long getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Long goodsId) {
        this.goodsId = goodsId;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsSn() {
        return goodsSn;
    }

    public void setGoodsSn(String goodsSn) {
        this.goodsSn = goodsSn;
    }

    public String getSpecification() {
        return specification;
    }

    public void setSpecification(String specification) {
        this.specification = specification;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Date getSupplyTime() {
        return supplyTime;
    }

    public void setSupplyTime(Date supplyTime) {
        this.supplyTime = supplyTime;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public BigDecimal getTaxRate() {
        return taxRate;
    }

    public void setTaxRate(BigDecimal taxRate) {
        this.taxRate = taxRate;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public Long getStockNum() {
        return stockNum;
    }

    public void setStockNum(Long stockNum) {
        this.stockNum = stockNum;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("contractId", getContractId())
                .append("goodsId", getGoodsId())
                .append("goodsName", getGoodsName())
                .append("goodsSn", getGoodsSn())
                .append("specification", getSpecification())
                .append("categoryId", getCategoryId())
                .append("categoryName", getCategoryName())
                .append("barcode", getBarcode())
            .append("price", getPrice())
            .append("num", getNum())
            .append("taxRate", getTaxRate())
            .append("totalPrice", getTotalPrice())
            .append("stockNum", getStockNum())
                .append("remark", getRemark())
                .append("unit",getUnit())
                .append("supplierName",getSupplierName())
                .append("supplierId",getSupplierId())
                .append("procurementPlanSn",getProcurementPlanSn())
            .toString();
    }
}
